home *** CD-ROM | disk | FTP | other *** search
/ Cracking 2 / Cracking II..iso / Texty / crackme / Nullz Crackme 1.1 4-5.txt < prev    next >
Encoding:
Text File  |  1999-03-04  |  7.1 KB  |  200 lines

  1. Hello again...
  2.  
  3. I'm back with Tut nuber 4/5 on >>Nullz<< CrackMe Version 1.1
  4.  
  5. This time it is a LITTLE more complicated to catch the serial,
  6. but still very easy, I did'nt write this tut ti COMPLETE newbies,
  7. though it might bee TOO easy, for Intermediate Crackers, But i say
  8. it is Intermediate anyway :)
  9.  
  10. This is what you need:
  11.  
  12. Soft-Ice 3.0 (or higher)
  13. >>Nulltz<< Crackme Version 1.1
  14.   - can be found on HarvestR's site: http://surf.to/HarvestR/ (nice site BTW...:-D)
  15. And this tut..hehe
  16.  
  17.  
  18. So, we fire up the proggie, we go to Level 4 "Pretty Common"
  19.  
  20. - Enter:
  21. Name   : EinZtein     <---- 8 Chars  (8 in HEX)
  22. Company: USC          <---- 3 Chars  (3 in HEX)
  23. Serial : 7894561230   <---- 10 Chars (A in HEX)
  24.  
  25.  
  26. hmmm...let's see.
  27.  
  28. What is the two most common used Breakpoint, when we are catching serials ?
  29. -GetWindowTextA & GetDlgItemTextA
  30.  
  31. So lets go to SoftIce by pressing Ctrl+D, and put a breakpoint on those two.
  32. Now, enter our Name/Company/Serial, and press ok.
  33. huh, S-Ice pops up, so we have probalby found the right place.
  34. First, push F11 to get out of the windows API call.
  35. Now, take a look at the EAX register. What do you see ?
  36.  
  37. We see: Eax == 00000008
  38.  
  39. That must be the name, and that is NOT what we are looking for. So lets just go on,
  40. by pushing F5, and F11 again.
  41.  
  42. ahh...What we now see is: EAX == 0000000A
  43.  
  44. That HAVE to be the serial. (This is very common used in normal protected shareware, so
  45. you will probably see this very often.)
  46.  
  47. Ok. We are in the right place...so, what now ?
  48.  
  49. Now we have to step a little, throug all the boring stuff, and get directly into the
  50. Serial Compare routine itself.
  51. (You can often find the Compare routine itself, by checking the registers, when they change,
  52. If your serial pops up in one of them, there is a big change you are in the right place.)
  53.  
  54. So let's step...
  55.  
  56. After we stepped a few times (with F10), we come to a new file called "Crackme".
  57. Hmm. That ain't so bad, coz the most common protection schemes is in the executable file 
  58. itself. So we are on the right way.
  59.  
  60. After 1 or 2 steps in the "Crackme" file, we see that our name is being put into EAX
  61. so do a: D EAX, and you'll see our name.
  62.  
  63. hmmm...could be something we might could use, so why dont we take a look on what
  64. happens next.
  65.  
  66. :00401E54 E8910D0000              Call 00402BEA
  67. :00401E59 8B442410                mov eax, dword ptr [esp+10]
  68. :00401E5D 8B40F8                  mov eax, dword ptr [eax-08]   <--- Our length of our name
  69.                                                                      gets in EAX
  70. :00401E60 83F805                  cmp eax, 00000005             <--- Have we writen less 
  71.                                                                      than 5 letters ?
  72. :00401E63 0F8CCD000000            jl 00401F36                   <--- If yes, go away
  73. :00401E69 3D00010000              cmp eax, 00000100             <--- More than 100(HEX) ?
  74. :00401E6E 0F8FC2000000            jg 00401F36                   <--- Go away again
  75.  
  76.  
  77. Check this: :00401E5D 8B40F8                  mov eax, dword ptr [eax-08]
  78.  
  79. (if your serial is in EAX, then is it very common used, that the length of your
  80. name/serial, is 8 chars behind the name/serial itself. i.e. If your serial is in EDX,
  81. the length of the serial is VERY often (almost always) in [EDX-08]. Remember that.)
  82.  
  83. well...back to the cracking part.
  84.  
  85. So, now we know that our name must be AT LEAST 5 chars, so if you did'nt wrote that,
  86. go change it.
  87.  
  88. Ok, we have now bypassed the check for our name. So let's see what we might find
  89. in the next few lines.
  90.  
  91. Right after the check we see this:
  92.  
  93. :00401E74 8B4C2414                mov ecx, dword ptr [esp+14]  <--- Serial get moved into ECX
  94. :00401E78 3959F8                  cmp dword ptr [ecx-08], ebx  <--- Length of serial is 
  95.                                                                     compared to 0
  96. :00401E7B 0F84C8000000            je 00401F49                  <--- Length of serial = 0 ?
  97.                                                                <--- Yes ? Go away!
  98.  
  99.  
  100. So, what do we do now ?. You oughta know by now...:-)
  101.  
  102. We do a check in ECX ofcource.
  103.  
  104. and what do we see ?
  105.  
  106. OUR SERIAL...ding ding
  107.  
  108. We MUST be close to the end now...
  109.  
  110. so lets take a closer look on what happens to our serial. ahh, it checks [ECX-08],
  111. must be the length of our serial. But what does it compare it to ?
  112. -cmp dword ptr [ecx-08], ebx
  113.  
  114. and what is EBX ?
  115.  
  116. EBX == 00000000
  117.  
  118. so, it checks if we have written a serial at ALL, but ofcource we have,
  119. so we just pass this check.
  120.  
  121. Let's step a little further to see if we catch something interesting...
  122.  
  123. we step, step, step and step, and NOTHING we can use ?
  124.  
  125. hmmm, could we might in the wrong place ?
  126.  
  127. nah, let's give it another try. Step some more...:-)
  128. (You might as well get use to it, when you are catching serials, there will ALWAYS be a
  129. hell lot of boring stepping.)
  130.  
  131. after like 15-20 steps, you will come to this:
  132.  
  133.  
  134. * Reference To: KERNEL32.lstrlenA, Ord:02A1h
  135.                                   |
  136. :00401EBA FF1500404000            Call dword ptr [00404000]
  137. :00401EC0 8D4C2414                lea ecx, dword ptr [esp+14]
  138. :00401EC4 8BF8                    mov edi, eax
  139.  
  140. * Reference To: MFC42.MFC42:NoName0092, Ord:106Bh
  141.                                   |
  142. :00401EC6 E8250D0000              Call 00402BF0
  143. :00401ECB 8B442414                mov eax, dword ptr [esp+14]   <--- Hmmmm
  144. :00401ECF 8D542420                lea edx, dword ptr [esp+20]
  145. :00401ED3 8B48F8                  mov ecx, dword ptr [eax-08]   <--- Hmmmm
  146. :00401ED6 2BC2                    sub eax, edx
  147.  
  148.  
  149. dont let os worry TOO much about what actually happens, coz we JUST wanna catch hat damn 
  150. serial, right ?.....:-)
  151.  
  152. So, lets take a look at EAX, just after we passed 00401ECB.
  153.  
  154. Hmm looks strange, What we see is "0321654987"
  155.  
  156. errr...Does'nt this look familiar ?
  157.  
  158. it is the serial we wrote, just backwards.
  159.  
  160. Why is that ?, you might ask yourself about.
  161. -It is probably just a little trick the programmer made, just to scare some dumb crackers away.
  162.  But not us!
  163.  
  164. so lets step by Adress 00401ED3.
  165.  
  166. now take a look at EDX. DING DING DING !
  167.  
  168. if THIS is not a serial, i am the Queen of Saba. BUT remember, OUR serial was
  169. written backwards, so, why should'nt THIS serial be written backward as well?
  170.  
  171. Hmmmm, kinda easy to find out though :)
  172.  
  173. Write the serial down, remove your breakpoints, by typing: "BC *", in SoftIce,
  174. and go try the serial as you saw it the first time (0321654987).
  175.  
  176. Huh, does'nt work ?
  177.  
  178. Try reverse it and write it backwards...
  179.  
  180. and THERE we go, it works !!!
  181.  
  182. Now try to put this Tut away, and try to catch the serial with your own name/company,
  183. all by yourself (No help from this tut).
  184. >>>Experience is the best book<<<
  185.  
  186. I hoped you enjoyed this little tut. If you have any comments on it, just catch me on:
  187. efNet, #Cracking4Newbies.
  188.  
  189. Greets to: MAK, BiGMoM, Vizion, CrackZ, Doctor Scoop, Decoder|Z, Corn2,
  190.            Rudeboy, DEZM, G-RoM, YOSHI, Darkl0rd, HarvestR, Quantum-X, 
  191.            Nitrus, Cruehead, r00ster, all the guys in #cracking4newbies
  192.            and all those i forgot....:-)  
  193.  
  194.  
  195. Than you for this time :)
  196.  
  197.  
  198. /EinZtein
  199.  
  200.